#include<iostream>
using namespace std;
const int N = 1e6 + 10;
typedef long long LL;
int primes[N];
int n, k;
int cnt;
bool st[N];
void get_prime(int n)
{
	for (int i = 2; i <= n; i++) {
		if (!st[i])primes[++cnt] = i;
		for (int j = 1; primes[j] <= n / i; j++) {
			st[primes[j] * i] = 1;
			if (i % primes[j] == 0)break;
		}
	}
}
int main()
{
	cin >> k;
	get_prime(1e5);
	int ans = 0;
	/*for (int i = 1; i <= cnt; i++) {
		cout << primes[i] << endl;
	}*/
	/*for (int i = 1; i <= cnt; i++) {
		if (!st[i]){
			if (i == 5) {
				cout << "hhe" << endl;
			}
			LL t = (LL)primes[i] * primes[i];
			if (t <= k) {
				cout << t << endl;
				ans++;
			}
		}
	}*/
	for (int i = 1; i <= cnt; i++) {
		LL t = (LL)primes[i] * primes[i];
		if (t <= k) {
			cout << t << endl;
			ans++;
		}
	}
	if (!ans)cout << -1 << endl;
	return	0;
}